home *** CD-ROM | disk | FTP | other *** search
- Path: holly.ACNS.ColoState.EDU!not-for-mail
- From: corbyh@holly.ACNS.ColoState.EDU (Corby S. Hudnall)
- Newsgroups: comp.lang.c++
- Subject: Re: Randomize
- Date: 5 Mar 1996 13:14:41 -0700
- Organization: Colorado State University, Fort Collins, CO 80523
- Message-ID: <4hi7bh$roe@holly.ACNS.ColoState.EDU>
- References: <313BD7D1.6143@IntNet.net>
- NNTP-Posting-Host: holly.acns.colostate.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Dave Cohoon (kahuna@IntNet.net) wrote:
- : (1) I cannot find a way to create a randomized int, this is one of the simplest functions in
- : basic, but in C++, I have no idea. Please Help.
- Look up the srand() and rand() functions, most often found in stdlib.h. srand()
- initialized the random number generator and rand spits out a pseudo random number. To get
- a specific range of random numbers, use something like this: rand()%(range+1)
-
-
- : (2) As mentioned above, I have been studying c++, I have been able comprehend the commands and
- : general jist, but even after spending copious amounts of time on a chapter,and writing sample
- : code to help memorize it, I find that I am still having to turn back 200 pages or so to
- : refresh myself on something. Is this "par for the course", or am I just not cracked up to
- : learn this stuff???
- The learning curve is different for each of us but practicing what you are learning is
- the key to becoming good at what you do. Don't spend so much time focusing on what makes
- C++ such an exceptional language when you are starting. You can worry about classes,
- templates, and general OOP techniques once you have mastered the basics. As a general
- rule, C is a much better first langauge then C++. Take the courses that you can and with
- time, you'll figure it out.
-
-
- : I was planning on taking a few coarses when school starts back up, in hope that one day I
- : might actually program professionally, but it seems like I can never learn enough to complete
- : the programs I'm working on. Is there ever an end?
- The language is so enormous, I think that most professional programers keep some sort
- of reference or notebook of notes that they've collected over the years.
-
-
- : P.S.----recently heard a few rumors that JAVA will probably be the future standard for the
- : windows environment, Does this seem to be a true prediction, and if so, How different is it from
- : C++
- Beware of nasty rumors. It's hard to say what the industry will adopt as "standard"
- but with the introduction of the STL, and the MFC, I doubt that C++ will be declining in
- the windows environment for quite some time.
-
-
- : Any Help would be greatly appreciated...
- To give you an idea, every job I've looked at or applied for as a Software Engineer
- has smiled greatly on OOP and C++. Java is so new, it'll be years before any sort of
- standard is adopted. C++ is a good example of how long a 'standard' is hard to come by.
- That's just my two cents. BTW, feel free to ask any language questions that you have
- here. I've found this newsgroup to be a realy nice pool of information I might not have
- otherwise picked up.
-
- // ------------ BEGIN SIGNATURE ---------------
- #include <iostream.h>
- void main()
- {
- cout<<"\aName:\tCorby S. Hudnall\n";
- cout<<"School:\tColorado State University\n";
- cout<<"EMail\tcorbyh@holly.colostate.edu\n";
- cout<<"URL\thttp://holly.colostate.edu/~corbyh/\n";
- }
- // ------------- END SIGNATURE ----------------
-